<?php
class Feed_model extends CI_Model {

	public $userId;
	public $targetId;
	public $content;
	public $objectId;
	public $replyTo;
	public $since;
	
	public function post($userId,$targetId = 0,$content,$objectId=0,$replyTo=0)	{
		$this->userId = $userId;
		$this->targetId = $targetId;
		$this->content = $content;
		$this->objectId = $objectId;
		$this->replyTo = $replyTo;
		$this->since = time();
		$result = $this->db->insert('feeds', $this);
		return $this->db->insert_id();
	}
}
?>